package company.C58_AC;

import java.util.Arrays;

public class C3B {

    public static void main(String[] args) {
        C3B c3B = new C3B();
        c3B.translateNum(12158);
    }

    public int translateNum(int num) {
        String str = String.valueOf(num);
        int length = str.length();
        int[] dp = new int[length + 1];
        dp[0] = 1;
        // 下标=0 只有一位就只有一种可能
        dp[1] = 1;
        //代表下标为1开始
        for (int i = 2; i <= length; i++) {
            int tmpNum = Integer.parseInt(str.substring(i - 2, i));
            System.out.println(tmpNum);
            if (tmpNum >= 10 && tmpNum <= 25) {
                dp[i] += dp[i - 2];
            }
            dp[i] += dp[i - 1];
        }
        System.out.println(Arrays.toString(dp));
        return dp[length];
    }
}
